<template>
    <div class="wrap">
        <p class="myStyle">{{ msg }}</p>
        <span>{{ calculate.count }}</span>
        <button @click="calculate.add(5)">点击累加</button>
        <router-view></router-view>
    </div>
</template>

<script lang="ts" setup>
import { ref } from "vue"
import { useCalStore } from '@/stores/calculate';

const msg = ref<string>('hello world');
const calculate = useCalStore();

setTimeout(() => {
  msg.value = '我是变化的值';
}, 2000)
</script>

<style lang="less" scoped>
.wrap{
  width: 300px;
  height: 200px;
  background-color: burlywood;
  .myStyle{
    font-size: 30px;
  }
}

</style>